Skip to content

Wrap image paths in angle brackets#2

Open
josephyooo wants to merge 1 commit intoMarkEdit-app:mainfrom
josephyooo:wrap-image-paths-in-angle-brackets
Open

Wrap image paths in angle brackets#2
josephyooo wants to merge 1 commit intoMarkEdit-app:mainfrom
josephyooo:wrap-image-paths-in-angle-brackets

Conversation

@josephyooo
Copy link
Copy Markdown

Description

Spaces in image path not accounted for. CommonMark says to use angle brackets.

Thus, I wrapped the image path in angle brackets. Pasting images with spaces in the path now works.

Risks

Angle brackets are allowed in paths on macOS/Linux, but aren't allowed unescaped, per CommonMark. Perhaps it could be implemented with:
const escaped = newFileName.replace(/[\\<>]/g, '\\$&');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant